package com.design.原型模式;

import java.util.Date;

public class TestMain {

	public static void main(String[] args) {
		
		Person p = new Person("张三",new Date());
		Person p2 = p.clone();
		p2.setUsername("王二");
		System.out.println(p.getUsername());
		System.out.println(p2.getUsername());
		
		
		
		SPerson sp = new SPerson("张三",new Date());
		SPerson sp2 = sp.clone();
		sp2.setUsername("李四");
		System.out.println(sp.getUsername());
		System.out.println(sp2.getUsername());
		
	}
	
}
